package cc.comac.mom.bean.lifelimit;

import lombok.Data;

import java.io.Serializable;

@Data
public class LimitResultBean implements Serializable {
    private static final long serialVersionUID = 1L;
    private int code;
    private String msg;
    private Object data;
    private Object columns;
    private Object PageData;

    public LimitResultBean() {
    }

    public LimitResultBean(int code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public LimitResultBean(int code, String msg, Object columns, Object pageData) {
        this.code = code;
        this.msg = msg;
        this.columns = columns;
        this.PageData = pageData;
    }

    public static LimitResultBean ok() {
        return new LimitResultBean(1, "" , null);
    }

    public static LimitResultBean ok(String msg) {
        return new LimitResultBean(1, msg, null);
    }

    public static LimitResultBean ok(String msg, Object data) {
        return new LimitResultBean(1, msg, data);
    }

    public static LimitResultBean error(String msg) {
        return new LimitResultBean(0, msg, null);
    }
}
